import Layout from './layout/index'
import Home from './views/home/index'
import Login from './views/login/index'
import Table from './views/table/index'
import SubTable from './views/table/sub-table/index'
import Form from './views/form/index'
import Grid from './views/grid/index'


import TableChartIcon from '@material-ui/icons/TableChart';
import HomeIcon from '@material-ui/icons/Home';
import AirplanemodeActiveIcon from '@material-ui/icons/AirplanemodeActive';
export const routers = [
    {
        path:'/login',
        name:"Login",
        exact: true,//關鍵
        hidden:true,
        component:Login
    },
    {
        path:"/",
        name:"Index",
        exact: true,
        icon: HomeIcon,
        layout:Layout,
        component:Home
    },
    {
        path:"/table",
        name:"table",
        exact:true,
        icon:TableChartIcon,
        layout:Layout,
        component:Table,
        children:[
            {
                path:'/sub-table',
                name:'subTable',
                icon: AirplanemodeActiveIcon,
                layout:Layout,
                exact:true,
                component:SubTable,
                children:[{
                    path:"/grid",
                    name:"grid",
                    exact:true,
                    icon:TableChartIcon,
                    layout:Layout,
                    component:Grid
                }]
            },
            {
                path:'/form',
                name:'form',
                icon: AirplanemodeActiveIcon,
                layout:Layout,
                exact:true,
                component:Form
            }
        ]
    },
]

export default routers;
